Conversation
|
Iroh is a dynamic analysis tool used for monitoring the runtime of the code, and manipulating data and program behaviours to facilitate testing. Its website is https://maierfelix.github.io/Iroh/ and its source code is located at https://github.com/maierfelix/Iroh/ Iroh can be used to track the runtime behaviour of code. For example, iroh has API functions that detect if the code enters or leaves an if statement or else statement, or can detect if the code enters another function. Iroh can also be used to intercept and modify data on the fly. Iroh enables programmers to test the runtime behaviour of the code easily, and catch any problems that happen at runtime. Iroh is highly customisable. It has a lot of API methods, used for detecting different behaviours in the code provided. Such customisation is also necessary because a programmer needs to specify what runtime behaviours to detect. A programmer who wishes to use this tool needs to look over the APIs of this tool and decide which API functions to apply. This tool does not test the code itself, but it can be used to write better test cases. In a development process, this tool should be used in conjunction with other static or dynamic analysis tools. Detecting runtime behaviour of code is a great addition to what the existing testing tools can detect. For example, in the NodeBB repository, we can write test cases in the tests folder that uses iroh to capture the number of if and else statements reached, every function call, and what the functions return. These test cases would be run by the GitHub CI workflow using mocha, which is a tool that already exists in the repository. False positives and false negatives don’t really make sense in the case of iroh, as it only monitors the runtime behaviours, and does no testing of the actual code. The programmer needs to decide how to call the API functions of iroh to detect the desired or undesired behaviours in the runtime. |
Installs and integrates maierfelix/Iroh into the repository.
Changelog:
The new tests can be run by running the command
npm test test/iroh.jsThe output for running the tests should look like the following:
Pros:
Cons: